home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 15 / unicom.zip / UCSCRIPT.HLP < prev    next >
Text File  |  1990-02-10  |  26KB  |  814 lines

  1.  
  2.  
  3. & "Introduction"
  4.  
  5. A script file is a text file constructed by you containing 
  6. commands that UNICOM will execute.  Script files are useful 
  7. in automating manual tasks such as dialing, logging in, 
  8. initiating file transfers, hanging up and so on.  
  9.  
  10. Instead of manually entering commands to UNICOM and to a host 
  11. computer, complex tasks may be performed automatically with 
  12. the execution of a single script file. 
  13.  
  14. Consider the following script language commands: 
  15.  
  16. WHILE NOT CONNECTED        ; This step will repeat dial until 
  17.   DIAL "555-6666"          ; the remote computer answers 
  18. ENDWHILE 
  19.  
  20. WAITFOR "Password:"        ; We wait for the password prompt 
  21. SEND "your password"       ; then send it to the remote  
  22.  
  23. WAITFOR "command prompt"   ; Wait until we are prompted 
  24. SEND "download command"    ; then issue a download command 
  25.  
  26. GETFILE protocol "received.dat"  ; retrieve a file  
  27.  
  28. WAITFOR "command prompt"   ; Again, wait until we are 
  29.                              prompted 
  30. SEND "logoff command"      ; then logout 
  31. HANGUP                     ; Tell UNICOM to hangup, we're 
  32.                                                     done 
  33.   
  34. This example illustrates how a script language file can be 
  35. used to automate the manual tasks of dialing, transferring 
  36. data and disconnecting the phone line.   
  37.  
  38. A script file may also be constructed to make decisions 
  39. based on information or events encountered during execution. 
  40.  
  41. The following example illustrates conditional branching: 
  42.  
  43.    Message "Do you Wish to Quit?" "?" yesno 
  44.    IF yes 
  45.      QUIT         ; exit UNICOM if User presses the yes 
  46. button 
  47.    ELSE 
  48.      . 
  49.      .  <-------- IF No, These steps are performed  
  50.      . 
  51.    ENDIF 
  52.  
  53.       
  54. The example above will display a message within a windows 
  55. message box that contains two buttons: yes and no.   
  56. If the user presses the yes button, a predefined conditional 
  57. variable named 'yes' will become true.  The IF statement is 
  58. used within the script language to test the value and branch 
  59. accordingly. 
  60.  
  61. UNICOM supports other statements that can be used for 
  62. conditional branching.  See the WHILE and SWITCH statements 
  63. in the Script Command Language Definition section. 
  64.   
  65. Additional, more powerful script language applications may 
  66. be developed beyond the examples discussed so far.  UNICOM 
  67. provides a rich and powerful set of commands that can be 
  68. used to solve very complex tasks. 
  69.  
  70. UNICOM script statements and commands span the following 
  71. categories: 
  72.  
  73.  1) Script Execution Control:  
  74.     IF, WHILE, SWITCH, CASE, EXIT, EXECUTE, TRACE 
  75.  
  76.  2) File Control: 
  77.     CHDIR, LOG 
  78.  
  79.  3) Query Functions: 
  80.     FINDWINDOW, FINDFILE, FIND  
  81.  
  82.  3) Program Settings: 
  83.     PORT, EMULATE, ASSIGN 
  84.  
  85.  4) Port Interaction and Control: 
  86.     BREAK, FLUSH, WAITFOR, SEND 
  87.  
  88.  5) User Interaction: 
  89.     ALARM, MESSAGE, INPUTSTRING, DISPLAYSTRING 
  90.  
  91.  6) Action Processing: 
  92.     DIAL, HANGUP, GETFILE, SENDFILE, DELAY, SNAPSHOT 
  93.   
  94.  7) Process and Window Control: 
  95.     KILLWINDOW, SHOWWINDOW, MOVEWINDOW, TITLEWINDOW, RUN, CLEAR 
  96.  
  97.  
  98.  
  99. & "Script Language Syntax" 
  100.  
  101. All script commands are case insensitive.  String variables 
  102. may be substituted for all commands that specify an immediate 
  103. string parameter.  For example: 
  104. Send "Hello" 
  105.  
  106. Will instruct UNICOM to transmit the same string as in the 
  107. following case: 
  108. Assign s1 "Hello" 
  109. Send s1 
  110.  
  111. UNICOM script command statements may be written using UPPER 
  112. and/or lower case. 
  113.  
  114. Blank spaces must delimit command arguments.  Double quote 
  115. characters can be used to enclose a string argument 
  116. containing spaces as shown in the example below. 
  117.  
  118. ASSIGN arg1 "This quoted string is one argument" 
  119.  
  120. Only one script command is allowed per line.  Lines are 
  121. limited to 80 characters in length.  Command arguments cannot 
  122. wrap around to the next line. 
  123.  
  124. & "Editing and Creating Script Files" 
  125.  
  126. Your personal text editor may be activated from UNICOM when 
  127. editing or creating script language files.  Before using this 
  128. feature, the complete editor pathname must be stored in the 
  129. script editor field located within the general setup window. 
  130.  
  131. To open a script file for editing, select the edit command 
  132. from the script menu.  A file selection window will appear 
  133. displaying all files found in the UNICOM directory with a 
  134. .SCR extension. 
  135.  
  136.  
  137. & "Executing Script Command Files" 
  138.  
  139. Script files may be executed at any time when in terminal 
  140. mode.  To activate a script file, select EXECUTE from the 
  141. script menu.  A file selection window will appear displaying 
  142. all files found containing a .SCR extension in the UNICOM 
  143. files directory. 
  144.  
  145. Once invoked, a script file will execute until an EXIT 
  146. statement is encountered.  Script execution may be 
  147. interrupted at any time by pressing the ESC key.   
  148.  
  149. During script execution, the UNICOM keyboard remains enabled 
  150. for user interaction.   
  151.  
  152. & "Tracing Script Execution" 
  153.  
  154. Script file commands may be echoed to your screen as they are 
  155. executed.  To enable this feature, select the TRACE menu 
  156. toggle from the script menu.  Each command will be echoed 
  157. line by line starting at the top of the terminal screen.  
  158. After reaching the bottom of the terminal screen buffer, 
  159. additional echoed commands will cause the terminal to scroll. 
  160.  
  161. Tracing is useful for observing the behavior of a script file 
  162. during execution.  Tracing may be enabled or disabled via 
  163. script command or through a menu selection.      
  164.  
  165.  
  166. & Alarm
  167.  
  168. ALARM [seconds] 
  169.  
  170. The ALARM command will alert the user to an event by ringing 
  171. the speaker bell.  The [seconds] parameter determines the 
  172. amount of time the alarm will sound.  If the [seconds] 
  173. parameter is omitted, the alarm will sound for 1 second. 
  174.  
  175. Returns: nothing 
  176. Example:  ALARM 4        (Sounds and alarm for 4 seconds) 
  177.  
  178. & Assign
  179.  
  180. ASSIGN variable "string" 
  181.  
  182. This command assigns the value of "string" to a user defined 
  183. variable.  To set a user variable from within your command 
  184. file, use the ASSIGN command. 
  185.  
  186. Returns: nothing 
  187. Examples: ASSIGN MyVar "Hello World" 
  188.           ASSIGN V3 MyVar 
  189.  
  190. & Break
  191.  
  192. BREAK [time] 
  193.  
  194. The BREAK command will place the communication line into a 
  195. break state. The optional [time] argument determines the 
  196. length of the break in milliseconds.  If [time] is not 
  197. specified, UNICOM will default to 350 milliseconds.   
  198.  
  199. Returns: nothing 
  200. Examples: BREAK          (sends a 350 msec break) 
  201.           BREAK 250      (sends a 250 msec break) 
  202.  
  203.  
  204. & Chdir
  205.  
  206. CHDIR "drive:directory" 
  207.  
  208. The CHDIR command will change the default drive and/or 
  209. directory to that specified in the argument string. 
  210.  
  211. Returns: SUCCESS 
  212. Examples: CHDIR "D:"          ( sets the drive to D:) 
  213.           CHDIR "C:\WINDOWS"  ( default to drive c:\windows) 
  214.           CHDIR "\Win"        ( default to directory \Win)    
  215.  
  216. & Clear
  217.  
  218. CLEAR 
  219.  
  220. CLEAR will erase the contents of the current terminal display.  
  221. The scrollback buffer is not affected.  If operating in color 
  222. mode, the screen will be set to the currently selected 
  223. background color.   
  224.  
  225. Returns: nothing  
  226. Example:  CLEAR     (erases the terminal screen) 
  227.  
  228. & Delay
  229.  
  230. DELAY [milliseconds] 
  231.  
  232. This command will pause script execution for the specified 
  233. number of milliseconds.  Data arriving from the 
  234. communications port is buffered during this delay.  The 
  235. amount to delay should not exceed the time necessary to fill 
  236. 4K at the current baud rate. 
  237.  
  238. UNICOM will default to a 1 second delay if the time argument 
  239. is omitted. 
  240.  
  241. Returns: nothing 
  242. Example:  DELAY 5000     (pauses the script 5 seconds) 
  243.  
  244. & Dial
  245.  
  246. DIAL  "phone number" 
  247.  
  248. The DIAL command will instruct the modem to dial the number 
  249. specified in the argument string.  The string is prefixed 
  250. with  a Hayes dialing command.  Use the IF [NOT] CONNECTED 
  251. command obtain the success or failure of this command. 
  252.  
  253. Returns: CONNECTED                      
  254. Example:  DIAL "555-1212"  (causes ATE1D*555-1212 to be sent to the 
  255. modem) 
  256.                            * = T or P as defined in modem setup.
  257.  
  258. & DisplayString
  259.  
  260. DISPLAYSTRING row column "string" 
  261.  
  262. This command will place an argument string at the specified 
  263. row and column on the terminal screen.  The row values may 
  264. range from 0 to 23.  The column values may range from 0 to 
  265. 79.  If the row and column arguments are omitted, 
  266. DISPLAYSTRING will default to row 0 and column 0.  The 
  267. current terminal cursor position is not affected. 
  268.  
  269. Returns: nothing 
  270. Example: DISPLAYSTRING 4 6 "Hello" (places Hello at row 4 column 6 
  271.  
  272. & Emulate
  273.  
  274. EMULATE [ansi|vt52|tty|color] 
  275.  
  276. This command sets UNICOM to operate using the specified 
  277. terminal emulation.  If no argument is provided, UNICOM will 
  278. default to ANSI Color Emulation.  
  279.  
  280. Returns: nothing 
  281. Example:  EMULATE ansi (sets UNICOM to B&W ANSI Emulation) 
  282.  
  283. & Execute
  284.  
  285. EXECUTE "cmd file" 
  286.  
  287. The EXECUTE command allows you to begin execution of a 
  288. different script file.  The currently executing script file 
  289. is interrupted  and control does not return.  This command 
  290. is a one-way chain to another script command file.  The 
  291. complete file specification must be provided in the 
  292. argument.  String variables are not reset when chaining to 
  293. different script files and may be used by the called file. 
  294.  
  295. Returns: nothing 
  296. Examples: EXECUTE "login.scr"  (execute file login.scr) 
  297.           INPUTSTRING  FileName "Enter the File to Execute" 
  298.           EXECUTE FileName 
  299.  
  300. & Exit
  301.  
  302. EXIT 
  303.  
  304. The EXIT command terminates the executing script file and 
  305. returns UNICOM to Terminal Mode operation. 
  306.  
  307. Returns: nothing 
  308. Examples: SEND "Terminating Session" (disconnect host) 
  309.           HANGUP                     (hangup modem   ) 
  310.           EXIT                       (enter Terminal Mode) 
  311.  
  312. & Find 
  313.  
  314. FIND VarName "Target" 
  315.  
  316. The FIND command examines the specified variable for an 
  317. occurrence of the "target" string.  The result of this command 
  318. can be obtained using the IF FOUND command.  The FIND command IS 
  319. CASE SENSITIVE. 
  320.  
  321. Returns: FOUND 
  322. Examples: INPUTSTRING S1 "Enter a Password"  (get response) 
  323.           FIND S0 "password"                 (search for 
  324. password) 
  325.           IF NOT FOUND 
  326.              MESSAGE "Invalid password" "ERROR" 
  327.           ELSE 
  328.              EXECUTE "other.scr" 
  329.           ENDIF 
  330.  
  331.  
  332. & FindFile
  333.   
  334. FINDFILE "filename" 
  335.  
  336. The FINDFILE command is used to determine if a specific file 
  337. exists in the directory path specified in the DOS PATH 
  338. environment variable.  The IF [NOT] FOUND command should be 
  339. used to test the result of this command.  
  340.  
  341. Returns: FOUND 
  342. Example: FINDFILE "unicom.exe" 
  343.          IF FOUND 
  344.            MESSAGE "Unicom was Found" "Attention"  
  345.          ELSE 
  346.            MESSAGE "Unicom Exists" "Found It!" 
  347.          ENDIF  
  348.  
  349. & FindWindow
  350.  
  351. FINDWINDOW "targetwindowtitle" 
  352.  
  353. The FINDWINDOW command is useful for testing for the 
  354. existence of any window.  The argument string must specify 
  355. the title appearing in the target Window.    
  356.  
  357. Returns: FOUND 
  358. Example: FINDWINDOW "Clock"   (look for the clock application) 
  359.          IF FOUND 
  360.             MESSAGE "Clock Is Running" "Attention" 
  361.          ELSE 
  362.             MESSAGE "Clock Not Found" "Attention" 
  363.          ENDIF 
  364.  
  365. & Flush
  366.  
  367. FLUSH [Receive|Transmit] 
  368.  
  369. This command will empty the receive or transmit buffers.  
  370. Flushing should not be considered complete after execution  
  371. of this command.  Use of a DELAY command is recommended for 
  372. up to 1 second after flushing.   
  373.  
  374. Returns: nothing 
  375. Example: FLUSH R      (empties the receive buffer)  
  376.          DELAY 1000   (allow time to flush completely) 
  377.  
  378. & GetFile
  379.  
  380. *GETFILE [XMODEM|YMODEM|ZMODEM|B|QUICKB|ASCII] ["filename"] 
  381.  
  382. This command will initiate a file download with the 
  383. specified protocol.  The optional "filename" parameter is 
  384. not required for ZMODEM, KERMIT, B, and QUICKB protocols 
  385. since it is provided by the host computer.  Use the IF [NOT] 
  386. SUCCESS statement to determine the result of the transfer. 
  387.  
  388. Example: INPUTSTRING F1 "Enter a file to Download" 
  389.          GETFILE XMODEM F1 
  390.          IF SUCCESS 
  391.              MESSAGE "FILE RECEIVED" "DOWNLOAD" 
  392.          ELSE 
  393.              MESSAGE "FILE RECEIVED FAILED" "DOWNLOAD" 
  394.          ENDIF 
  395.  
  396. *NOTE: Use of GetFile requires registration 
  397.  
  398. & Hangup
  399.  
  400. HANGUP [DTR] [droptime] 
  401.  
  402. HANGUP (with no parameters) will cause the modem attention 
  403. sequence '+++' to be transmitted in an effort to place the 
  404. modem into command mode.  Once in command mode, the "ATH" 
  405. string is sent to disconnect the line.   
  406.  
  407. If the DTR parameter is specified, UNICOM lowers the Data 
  408. Terminal Ready Signal for 'droptime' milliseconds to 
  409. instruct the modem to hang up.  The modem must be configured 
  410. to sense the loss of DTR.  There is no return value for this 
  411. hangup method. 
  412.  
  413. The IF [NOT] CONNECTED command can be used to test the 
  414. result of the first hangup method.  The result is determined 
  415. by obtaining the modem OK result string upon sending the 
  416. hangup command. 
  417.  
  418. Examples:  HANGUP 
  419.            IF NOT CONNECTED 
  420.               MESSAGE "Hangup Completed" "Attention" 
  421.            ENDIF 
  422.  
  423.            HANGUP DTR 4000    (lowers DTR for 4 seconds) 
  424.  
  425. & IF 
  426.  
  427. IF condition 
  428.  
  429. The IF command is used to provide conditional control over 
  430. script execution.  The following syntax is represented as  
  431. follows: 
  432.  
  433. IF condition 
  434.    [perform these commands] 
  435.     . 
  436.     . 
  437. ELSE 
  438.    [perform these steps] 
  439.     . 
  440.     . 
  441. ENDIF 
  442.  
  443. IF (continued) 
  444.  
  445. The ELSE is optional and there must be an ENDIF for every IF 
  446. statement.  Commands may be nested up to 12 levels deep.   
  447.  
  448. Valid conditions for the IF command are SUCCESS, CONNECTED, 
  449. FOUND, WAITFOR, OK, CANCEL, ABORT, RETRY, IGNORE, YES, NO 
  450.  
  451. The OK, CANCEL, ABORT, RETRY, IGNORE, YES and NO conditions, 
  452. when true, indicates the user response to a MESSAGE command. 
  453.  
  454. The FOUND condition is used to test the result of the last 
  455. FIND type command. 
  456.  
  457. FIND, FINDFILE, FINDWINDOW will set the FOUND condition 
  458. flag.  The CONNECTED condition is used to test the result of 
  459. the DIAL and HANGUP commands.  The WAITFOR condition is used 
  460. to check the result of the last WAITFOR command.  If the 
  461. "target" specified in the WAITFOR command was received, the 
  462. WAITFOR condition would be set true.  The WAITFOR condition 
  463. would be set false if the last WAITFOR command timed out 
  464. before receiving the "target".  The NOT operator may prefix 
  465. any conditionals.  The NOT will reverse the value of the 
  466. condition it prefixes.  For example, if SUCCESS is false, 
  467. then NOT SUCCESS would be true. 
  468.  
  469. & InputString 
  470.  
  471. INPUTSTRING variable ["user prompt"] 
  472.  
  473. This command will display a pop-up window containing an Edit 
  474. Box to accept a user entered string.  When entered, the 
  475. string is assigned to the variable specified.  An optional 
  476. prompt string may be specified that will be displayed in the 
  477. title of the window.  The accepted string length is limited 
  478. to 80 characters. 
  479.  
  480. Returns: SUCCESS 
  481. Example: INPUTSTRING V23 "Enter your Name" 
  482. The above example causes a Window titled: 
  483.  "Enter Your Name"  to appear with an edit box. 
  484.  
  485. & KillWindow 
  486.  
  487. KILLWINDOW "string" 
  488.  
  489. The KILLWINDOW command searches for a window containing a 
  490. title matching the string argument.  If one is found, UNICOM 
  491. will send a Destroy message to that window.  Applications 
  492. may be destroyed if their top level (main) window is killed. 
  493.  
  494. Returns: SUCCESS 
  495. Example: KILLWINDOW "Clock"   (kills the clock application) 
  496.  
  497. & Locate
  498.  
  499. LOCATE row col 
  500.  
  501. The LOCATE command positions the terminal cursor to the  row 
  502. and column specified.  Rows are numbered 0-23, columns 0-79.  
  503. Row 0, column 0 is defined as the upper left corner of the 
  504. screen. 
  505.  
  506. Returns: nothing 
  507. Examples: LOCATE 10 20     (set cursor to row 10 col 20) 
  508.           LOCATE R1 CX      (set cursor row and col 
  509.                         contained in variables R1 and CX) 
  510.  
  511. & Log
  512.  
  513. LOG [option] 
  514.      OPEN ["filename"] 
  515.      CLOSE 
  516.      SUSPEND 
  517.      RESUME 
  518.  
  519. The LOG command controls file logging during execution of a 
  520. script language file.  The OPEN command will create a new 
  521. file or append to an existing file by the same name.  If the 
  522. filename is omitted, UNICOM.LOG will be used by default. 
  523.  
  524. The CLOSE command will close an open log file. 
  525. The SUSPEND command pauses file logging without closing the  
  526. file (maintaining its file position). 
  527. The RESUME command will resume logging once a SUSPEND 
  528. command has been  executed. 
  529.  
  530. Returns: SUCCESS 
  531. Examples: LOG OPEN       (opens UNICOM.LOG for logging) 
  532.           LOG SUSPEND      (pauses logging) 
  533.           LOG RESUME       ( resume logging) 
  534.           LOG CLOSE        ( close log file) 
  535.  
  536.  
  537. & Message
  538.  
  539. MESSAGE "string" ["title"] [button options] [icon options] 
  540.         button options =   [ok]           (DEFAULT) 
  541.                            [abortretryignore] 
  542.                            [okcancel] 
  543.                            [yesno] 
  544.                            [yesnocancel] 
  545.                            [retrycancel] 
  546.  
  547.         icon options   =   [iconhand]     (DEFAULT = No Icon) 
  548.                            [iconquestion] 
  549.                            [iconexclamation] 
  550.                            [iconasterisk] 
  551.  
  552. When executed, the MESSAGE command will display a windows 
  553. message box containing a message passed in the string 
  554. argument.  The message box may contain an optional title 
  555. that will appear in the title of the window.  The button 
  556. style is selected using the optional button style field.  If 
  557. omitted, the OK style is used as a default.  An optional 
  558. icon can be displayed in the message box by specifying an 
  559. icon type in the icon options field.  If omitted, the 
  560. default for this field is no icon.  Message will set a 
  561. conditional flag that corresponds to the button selected by 
  562. the user.  The conditional flags shown below may be tested 
  563. using the IF statement. 
  564.  
  565. Returns:  ok|cancel|abort|retry|ignore|yes|no 
  566. Example:  INPUTSTRING name "Enter your Name" 
  567.           MESSAGE name "You Entered" okcancel iconquestion 
  568.           IF cancel 
  569.             exit 
  570.           ELSE  
  571.             MESSAGE "You Entered Ok" "OK!" 
  572.           ENDIF 
  573.  
  574. & MoveWindow
  575.  
  576. MOVEWINDOW "title" x y width height 
  577.  
  578. This command will move and size any window.  The title argument 
  579. string is the title of the window to be moved.  The x and y 
  580. parameters represent the screen location where the upper left 
  581. corner of the window will be placed.  Width and height parameters 
  582. specify the dimension (in pixels) for resizing.  If omitted, the 
  583. x, y, width and height parameters will default to zero which can 
  584. produce strange results.     
  585.  
  586. Returns: SUCCESS 
  587. Example: MoveWindow "Clock" 100 150 200 100 
  588.  
  589. & Port 
  590.  
  591. PORT "device;baud;parity;wordsize;stopbits;duplex" 
  592.  
  593. PORT sets the communication port to the settings listed in 
  594. the argument.  All arguments are required, arguments must be 
  595. separated by semicolons with no separating blanks. 
  596.  
  597. Returns:  SUCCESS 
  598. Example:  PORT "COM1;1200;N;8;1;FULL" 
  599.           PORT "NONE"    (Closes Current Port) 
  600.  
  601. Argument Field           Supported Values 
  602. DEVICE                   NONE|COM1|COM2|COM3|COM4 
  603. BAUD                     300 |1200|2400|4800|9600|19200 
  604. PARITY                   N|E|O  (None, Even, Odd) 
  605. WORD SIZE                7|8 
  606. STOP BITS                1|2 
  607. DUPLEX                   FULL|HALF 
  608.  
  609. & Quit
  610.  
  611. QUIT 
  612.  
  613. When executed, the QUIT command will terminate execution of 
  614. the script file and immediately close UNICOM with no 
  615. questions asked.  The UNICOM window is destroyed. 
  616.  
  617. Returns: nothing 
  618. Example:    SEND "Bye"    (log off host) 
  619.             HANGUP        (hangup the modem) 
  620.             QUIT          (exit UNICOM) 
  621.  
  622. & Run
  623.  
  624. RUN "program" [param1 param2 ...paramN] 
  625.  
  626. The RUN command will execute another Windows or DOS 
  627. application.  RUN sets the SUCCESS condition flag if the 
  628. program was successfully run. 
  629.  
  630. Returns: SUCCESS 
  631. Examples:  ASSIGN prog "Excel.exe" 
  632.            RUN prog 
  633.            IF SUCCESS 
  634.              MESSAGE "Excel is running" "OK!" 
  635.            ELSE 
  636.              MESSAGE "Unable to Run Excel" "ATTENTION" 
  637.            ENDIF 
  638.  
  639. & Send
  640.  
  641. SEND "string" 
  642.  
  643. The SEND command will transmit the specified string to the 
  644. remote host computer.  Control characters can be transmitted 
  645. with the use of the '^' prefix character.  
  646.  
  647. Returns:  nothing 
  648. Example:  SEND "Hello^M"   (sends Hello followed by a CR) 
  649.  
  650. & SendFile
  651.  
  652. * SENDFILE  [protocol][filename|filelist] 
  653.               KERMIT "filename" 
  654.               XMODEM "filename" 
  655.               YMODEM "filename" 
  656.               ZMODEM  file1 [file2 file3...] 
  657.               ASCII  "filename" 
  658.               B      "filename" 
  659.               QUICKB "filename" 
  660.  
  661. The SENDFILE command will initiate a file upload to the   
  662. remote host computer using a protocol specified in the list 
  663. above. 
  664.  
  665. Returns:  SUCCESS 
  666. Examples: WAITFOR "Begin the transfer now"  (wait until ready) 
  667.           ASSIGN F1 "stock.xls" 
  668.           ASSIGN F2 "tax.xls" 
  669.           INPUTSTRING F3 "Enter another File to send" 
  670.           SENDFILE ZMODEM F1 F2 F3 "other.dat" 
  671.  
  672. The above example sends files stock.xls, tax.xls, a user 
  673. named file in F3, and other.dat using ZMODEM batch protocol. 
  674.  
  675. * NOTE: Use of this function requires Registration  
  676.  
  677. & ShowWindow
  678.  
  679. SHOWWINDOW "title" [HIDE|ZOOM|MINIMIZE|SHOW] 
  680.  
  681. SHOWWINDOW will control the appearance of any Window that 
  682. can be identified by its title.  Optional parameters shown 
  683. above, instruct the window to enter a new state as defined 
  684. below: 
  685.  
  686. HIDE:      Iconize the window and activate another 
  687. ZOOM:      Zoom the window to full screen 
  688. MINIMIZE:  Activate window - display as iconic 
  689. SHOW:      (DEFAULT) Activates and displays a window. If it 
  690. is iconic or Zoomed, the window is restored to its original 
  691. size and position. 
  692.  
  693. Returns: SUCCESS 
  694. Example: SHOWWINDOW "Clock" ZOOM   (zooms clock to full screen) 
  695.  
  696. & SnapShot
  697.  
  698. SNAPSHOT  
  699.  
  700. This command will send the current contents of rows 0-24 of 
  701. the terminal screen to the windows spooler for printing. 
  702.  
  703. Returns: nothing 
  704. Example: SNAPSHOT 
  705.  
  706. & SWITCH 
  707.  
  708. SWITCH variable 
  709.  
  710. The SWITCH command allows script execution to branch 
  711. conditionally based on comparison of the SWITCH argument to 
  712. a CASE argument.  SWITCH compares the value of a string 
  713. variable against the values of CASE arguments.  Control will 
  714. branch to the next command following a matching CASE 
  715. argument. 
  716.  
  717.   SWITCH NAME              (Compare cases to NAME variable) 
  718.     CASE "Alfred"          (if it matches  ) 
  719.          (do these commands) 
  720.     ENDCASE                (until reaching ENDCASE)  
  721.     CASE "George"          (does NAME = George?) 
  722.     ENDCASE                (required to terminate each case) 
  723.     DEFAULT                (execute these commands ) 
  724.   ENDSWITCH                (this ends the SWITCH   ) 
  725.  
  726. NAME is a string variable containing a string value obtained 
  727. by an ASSIGN or INPUTSTRING command.  A CASE argument found 
  728. to match the SWITCH argument, will cause UNICOM to begin 
  729. script file execution starting with the command immediately 
  730. following the matching CASE.  Execution continues until an 
  731. ENDCASE command is found.  Upon encountering an ENDCASE, 
  732. UNICOM skips to the command immediately following the 
  733. matching ENDSWITCH command and resumes execution.  Note that 
  734. each CASE statement must have a matching ENDCASE, and each 
  735. SWITCH a matching ENDSWITCH.  The optional DEFAULT case is a 
  736. special case that will be executed provided no CASE 
  737. statements evaluate to TRUE.  The DEFAULT case must be 
  738. positioned behind all CASE/ENDCASE statements for the 
  739. SWITCH.  If there is no DEFAULT case, and no other match is 
  740. found, command file execution will continue with the 
  741. statement following the ENDSWITCH command. 
  742.  
  743. & TitleWindow
  744.  
  745. TITLEWINDOW oldtitle newtitle 
  746.  
  747. This command will replace the title for the first window 
  748. found that contains a title matching the oldtitle parameter. 
  749.  
  750. Returns:  nothing 
  751. Example:   ASSIGN TARGETWINDOW "Clock" 
  752.            TITLEWINDOW TARGETWINDOW "MyClock" 
  753.  
  754. The above example will replace the title of the Clock 
  755. application with the argument string: "MyClock" 
  756.  
  757. & Trace
  758.  
  759. TRACE [ON|OFF] 
  760.  
  761. The TRACE command allows you to "trace" the execution of a 
  762. command file.  If you set TRACE ON, every command will be 
  763. echoed to the screen as it is executed.  TRACE is useful for 
  764. debugging script command files. 
  765.  
  766. Returns: nothing 
  767. Example: TRACE ON       (sets tracing on) 
  768.          TRACE          (sets tracing off) DEFAULT 
  769.  
  770. & Transmit
  771.  
  772. TRANSMIT "string" 
  773.  
  774. See the SEND command - it is identical. 
  775.  
  776. & Waitfor
  777.  
  778. WAITFOR "target" [delay] 
  779.  
  780. The WAITFOR command allows you to pause script execution 
  781. until a specific string has been received from the remote 
  782. host.  The [delay] option instructs UNICOM wait for the 
  783. "target" string for a maximum of delay seconds before timing 
  784. out.  A timeout will cause execution to proceed.  If no 
  785. [delay] is specified, UNICOM will wait 30 seconds by 
  786. default. 
  787.  
  788. Use the IF WAITFOR condition to test the results of a 
  789. WAITFOR command.  Control characters may be expressed in the 
  790. "target" string with the use of the '^' control prefix 
  791. character. 
  792.  
  793. Examples: WAITFOR "^J USERNAME"   (waits for LF, space, USERNAME) 
  794.                                   ( using a 30 Second Wait) 
  795.           IF WAITFOR              (it found w/o timeout) 
  796.             TRANSMIT "username"   (send username) 
  797.           ENDIF 
  798.  
  799. NOTE: WAITFOR targets are CASE SENSITIVE 
  800.  
  801. & WHILE
  802.  
  803. WHILE condition 
  804.  
  805. The WHILE statement allows commands that precede an ENDWHILE 
  806. statement to execute repeatedly until the WHILE condition 
  807. evaluates true. 
  808.  
  809. Example:  WHILE NOT CONNECTED  (dial forever until connected) 
  810.             DIAL "555-1212" 
  811.           ENDWHILE 
  812.  
  813.  
  814.